package cn.fintecher.pangolin.entity.elastic;

import cn.fintecher.pangolin.common.annotation.ReportAnno;
import cn.fintecher.pangolin.common.utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.Date;

/**
 * @Auther: xiaqun
 * @Description: 催收员回款报表
 * @Date: 11:05 2019/12/16
 */

@Data
@Document(indexName = Constants.USER_PAYMENT, type = Constants.USER_PAYMENT, shards = 1, replicas = 0)
@ApiModel(value = "催收员回款报表", description = "催收员回款报表")
public class UserPayment {
    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "统计日期")
    @ReportAnno(name = "日期", sort = 3)
    private Date reportDate;

    @ApiModelProperty(value = "部门ID")
    private String departId;

    @ApiModelProperty(value = "部门名称")
    @ReportAnno(name = "部门", sort = 1, isMerge = true)
    private String departName;

    @ApiModelProperty(value = "部门code")
    private String departCode;

    @ApiModelProperty(value = "催收员ID")
    private String userId;

    @ApiModelProperty(value = "催收员名称")
    @ReportAnno(name = "催收员", sort = 2, isMerge = true)
    private String userName;

    @ApiModelProperty(value = "在催案件数")
    @ReportAnno(name = "在催案件数", sort = 4)
    private Integer collectingNumber = 0;

    @ApiModelProperty(value = "在催案件金额")
    @ReportAnno(name = "在催案件金额", sort = 5, scale = 2)
    private Double collectingAmt = 0d;

    @ApiModelProperty(value = "回款笔数")
    @ReportAnno(name = "回款笔数", sort = 6)
    private Integer paymentNumber = 0;

    @ApiModelProperty(value = "回款金额")
    @ReportAnno(name = "回款金额", sort = 7, scale = 2)
    private Double paymentAmt = 0d;

    @ApiModelProperty(value = "回款率")
    @ReportAnno(name = "回款率(%)", sort = 8, scale = 4, isRate = true)
    private float paymentRate = 0.f;
}
